import i18n from '@/i18n';
const { t } = i18n.global as any;

export const getTime = () => {
  let message = '';
  const hours = new Date().getHours();
  if (hours <= 11) {
    message = t('global.getTime.morning');
  } else if (hours < 13) {
    message = t('global.getTime.noon');
  } else if (hours <= 18) {
    message = t('global.getTime.afternoon');
  } else {
    message = t('global.getTime.evening');
  }
  return message;
};
